
<form name="editForm" role="form" novalidate ng-submit="vm.save()" show-validation>

    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true"
                ng-click="vm.clear()">&times;</button>
        <h4 class="modal-title" id="myViewPagerLabel" translate="weiyouquApp.viewPager.home.createOrEditLabel">Create or edit a View Pager</h4>
    </div>
    <div class="modal-body">
        <jhi-alert-error></jhi-alert-error>
        <div class="form-group" ng-show="vm.viewPager.id">
            <label for="id" translate="global.field.id">ID</label>
            <input type="text" class="form-control" id="id" name="id"
                    ng-model="vm.viewPager.id" readonly />
        </div>
        <div class="form-group">
            <label class="control-label" translate="weiyouquApp.viewPager.img" for="field_img">Img</label>
            <input type="text" class="form-control" name="img" id="field_img"
                    ng-model="vm.viewPager.img"
                    required ng-pattern="/^[a-zA-z]+://[^\s]*$/" />
            <div ng-show="editForm.img.$invalid">
                <p class="help-block"
                    ng-show="editForm.img.$error.required" translate="entity.validation.required">
                    This field is required.
                </p>
                <p class="help-block"
                    ng-show="editForm.img.$error.pattern" translate="entity.validation.pattern" translate-value-pattern="^[a-zA-z]+://[^\s]*$">
                    This field should follow pattern "^[a-zA-z]+://[^\s]*$".
                </p>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label" translate="weiyouquApp.viewPager.url" for="field_url">Url</label>
            <input type="text" class="form-control" name="url" id="field_url"
                    ng-model="vm.viewPager.url"
                    required ng-pattern="/^[a-zA-z]+://[^\s]*$/" />
            <div ng-show="editForm.url.$invalid">
                <p class="help-block"
                    ng-show="editForm.url.$error.required" translate="entity.validation.required">
                    This field is required.
                </p>
                <p class="help-block"
                    ng-show="editForm.url.$error.pattern" translate="entity.validation.pattern" translate-value-pattern="^[a-zA-z]+://[^\s]*$">
                    This field should follow pattern "^[a-zA-z]+://[^\s]*$".
                </p>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label" translate="weiyouquApp.viewPager.type" for="field_type">Type</label>
            <input type="number" class="form-control" name="type" id="field_type"
                    ng-model="vm.viewPager.type"
                    required />
            <div ng-show="editForm.type.$invalid">
                <p class="help-block"
                    ng-show="editForm.type.$error.required" translate="entity.validation.required">
                    This field is required.
                </p>
                <p class="help-block"
                    ng-show="editForm.type.$error.number" translate="entity.validation.number">
                    This field should be a number.
                </p>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label" translate="weiyouquApp.viewPager.title" for="field_title">Title</label>
            <input type="text" class="form-control" name="title" id="field_title"
                    ng-model="vm.viewPager.title"
                     />
        </div>

    </div>
    <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal" ng-click="vm.clear()">
            <span class="glyphicon glyphicon-ban-circle"></span>&nbsp;<span translate="entity.action.cancel">Cancel</span>
        </button>
        <button type="submit" ng-disabled="editForm.$invalid || vm.isSaving" class="btn btn-primary">
            <span class="glyphicon glyphicon-save"></span>&nbsp;<span translate="entity.action.save">Save</span>
        </button>
    </div>
</form>
